package work.jame.blog.service;

import work.jame.blog.pojo.UserConfiguration;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Jame
 * @since 2023-05-15
 */
public interface UserConfigurationService extends IService<UserConfiguration> {

    /**
     * 根据用户id查询用户的设置项
     * @param userId 用户id
     * @return UserConfiguration
     */
    UserConfiguration queryUserConfigurationByUserId(Long userId);


    /**
     * 获取当前登录用户的配置
     * @return UserConfiguration
     */
    UserConfiguration getCurrentLoginUserConfiguration();


    /**
     * 保存用户默认配置
     * @param userId
     */
    void saveUserDefaultConfiguration(Long userId);


    /**
     * 修改用户配置项
     * @param userConfiguration userConfiguration
     * @return
     */
    boolean updateUserConfiguration(UserConfiguration userConfiguration);

}
